﻿using Microsoft.AspNet.SignalR;
using Newtonsoft.Json;
using OASystem.BLL;
using OASystem.BLL.IService;
using OASystem.BLL.Service;
using OASystem.Common;
using OASystem.Model;
using OASystem.Models;
using OASystem.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Security.Claims;
using System.Web;
using System.Web.Mvc;
/// <summary>
/// 通知及添加页简单操作
/// </summary>
namespace OASystem.Controllers
{
    public class Notic_tailController : Controller
    {
        /// <summary>
        /// 部门注入_Notic_tailService
        /// </summary>
        #region 部门注入_Notic_tailService
        private INotic_tailService _Notic_tailService;
        public Notic_tailController(INotic_tailService Notic_tailService)
        {
            _Notic_tailService = Notic_tailService;

        }
        #endregion
        /// <summary>
        /// 查看所有部门名称(添加通知部门下拉框)
        /// </summary>
        /// <returns></returns>
        #region 查看所有部门名称
        public JsonResult DepartInfo()
        {
            //Lambda表达式查询所有部门
            Expression<Func<Departinfo, bool>> whereLambda = a => true;
            //接收集合部门表
            List<Departinfo> departinfos = _Notic_tailService.QueryList(whereLambda);
            //提交到前台处理
            return Json(departinfos);
        }
        #endregion
    }

}